VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} formAlgoritmo 
   Caption         =   "Iso Writing"
   ClientHeight    =   5220
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6405
   OleObjectBlob   =   "formAlgoritmo.frx":0000
   StartUpPosition =   1  'CenterOwner
End
Attribute VB_Name = "formAlgoritmo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub CommandButton1_Click()
    Dim selection As Boolean
    selection = verify()
    If selection = True Then
        Dim algorithm As Long
        If OptionButton1 = True Then
            algorithm = 1
        Else
            If OptionButton2 = True Then
                algorithm = 2
            Else
                If OptionButton3 = True Then
                    algorithm = 3
                Else
                    If OptionButton4 = True Then
                        algorithm = 4
                    Else
                        If OptionButton5 = True Then
                            algorithm = 5
                        Else
                            If OptionButton6 = True Then
                                algorithm = 6
                            Else
                                algorithm = 7
                            End If
                        End If
                    End If
                End If
            End If
        End If
        Dim nomeFile As String
        nomeFile = TextBox1.Value
        Call mainCreaIso(algorithm, nomeFile)
    Else
        MsgBox "Selezionare la mattonella!"
    End If
End Sub

Private Sub CommandButton2_Click()
    Dim selection As Boolean
    selection = verify()
    If selection = True Then
        Dim algorithm As Long
        If OptionButton1 = True Then
            algorithm = 1
        Else
            If OptionButton2 = True Then
                algorithm = 2
            Else
                If OptionButton3 = True Then
                    algorithm = 3
                Else
                    If OptionButton4 = True Then
                        algorithm = 4
                    Else
                    If OptionButton5 = True Then
                            algorithm = 5
                        Else
                            If OptionButton6 = True Then
                                algorithm = 6
                            Else
                                algorithm = 7
                            End If
                        End If
                    End If
                End If
            End If
        End If
        Call mainMostraPercorso(algorithm)
    Else
        MsgBox "Selezionare la mattonella!"
    End If
End Sub

Private Sub CommandButton3_Click()
    Dim selection As Boolean
    selection = verify()
    If selection = True Then
        Call mostraPath
    Else
        MsgBox "Selezionare la mattonella!"
    End If
End Sub
Private Function verify() As Boolean
    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    If (OrigSelection.Shapes.Count < 1) Then
        verify = False
    Else
        'If OrigSelection.Shapes(1).Shapes.Count < 2 Then
        '    verify = False
        'Else
            verify = True
        'End If
    End If
End Function

